home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group01b.txt
/
000168_icon-group-sender_Thu Nov 8 17:05:41 2001.msg
< prev
next >
Wrap
Internet Message Format
|
2002-01-03
|
2KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id fA904II06858
for icon-group-addresses; Thu, 8 Nov 2001 17:04:18 -0700 (MST)
Message-Id: <200111090004.fA904II06858@baskerville.CS.Arizona.EDU>
Date: Thu, 08 Nov 2001 14:23:47 -0700
From: Steve Wampler <swampler@noao.edu>
X-Accept-Language: en
To: Taybin Rutkin <trutkin@physics.clarku.edu>
CC: icon-group@cs.arizona.edu
Subject: Re: mutual evaluation
Errors-To: icon-group-errors@cs.arizona.edu
Status: RO
Content-Length: 1024
Taybin Rutkin wrote:
>
> On Thu, 8 Nov 2001, Steve Wampler wrote:
>
> > As an aside, it might have been cleaner if I had written:
> >
> > return 3(f := open(fName), seek(f,0), where(f)-1, close(f))
> >
> > instead of
> >
> > return 2(f := open(fName), where(seek(f,0))-1, close(f))
> >
> > in the previous message, since the first more clearly shows
> > the steps involved.
>
> I see. It's been awhile. I thought it looked lambda-esque. I take it
> that it doesn't short circut? Otherwise, in 2(), it would skip the
> close(f). Is this correct?
>
> Taybin
Exactly right. The evaluation itself is equivalent to
(f := open(fName) & (seek(f,0)) & (where(f)-1) & (close(f))
*except* that the value of expr0 determines which of the conjoined
expressions' results gets produced, instead of just producing the
result of the last (as the above conjunction sequence does).
Normal Icon goal-directed evaluation applies, of course.
--
Steve Wampler- SOLIS Project, National Solar Observatory
swampler@noao.edu